<#-- jQuery, bootstrap, easyui 
	Add method : model dialog
-->
<@pp.dropOutputFile/>
<@pp.changeOutputFile name="/main/webapp/common/import_m_js.ftl"/>
<#noparse>
<script type="text/javascript" src="${base}/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${base}/plugins/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${base}/plugins/jquery.validate/jquery.validate.min.js"></script>
<script type="text/javascript" src="${base}/plugins/jquery.validate/messages_zh.min.js"></script>
<script type="text/javascript" src="${base}/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="${base}/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.zh-CN.js" charset="utf-8"></script>
<script type="text/javascript" src="${base}/plugins/notifIt/js/notifIt.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${base}/plugins/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${base}/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>

<script type="text/javascript">

function showTip(success, title, message){
	var type = success ? "success" : "danger";
	notif({
		msg: title,
		type: type,
		autohide: true,
		position: "center"
	});

}
function hidTip(){
	$("#alert_window").removeClass("show").addClass("hidden");
}

function array2map(array){
	var m = {};
	for(a in array){
		m[array[a].name] = encodeURI(array[a].value);
	}
	return m;
}

//Load  
function loading(tip) {  
}  
  
//hidden Load  
function loaded() {  
}  

$.download = function(url, data, method){
    if( url && data ){ 
        data = typeof data == 'string' ? data : $.param(data);
        var inputs = '';
        $.each(data.split('&'), function(){ 
            var pair = this.split('=');
            inputs+='<input type="hidden" name="'+ pair[0] +'" value="'+ pair[1] +'" />'; 
        });
        $('<form action="'+ url +'" method="'+ (method||'post') +'">'+inputs+'</form>')
        .appendTo('body').submit().remove();
    };
};

</script>
</#noparse>